

console.log(`hello test core2`);



let dd = window.dd = require('../core/index');
let SCREEN_WIDTH = 480;
let SCREEN_HEIGHT = 800;

let Imgs = window.Imgs = {};
let gameApp;
window.onload = function () {
    console.log('start....');
    let canvas = document.getElementById('game');
    gameApp = new dd.GameApp(canvas, SCREEN_WIDTH, SCREEN_HEIGHT, 2);
    dd.texCache.async_preloadImgs(Imgs).then(startGame);
};

function startGame() {
    dd.cfg.defaultTexture = dd.texCache.getTexture2D(Imgs.Img_default);
    let mapScene = new dd.Scene();
    gameApp.startWithScene(mapScene);
}
